package braden.cis.uab.edu.grammar;

import java.util.ArrayList;

public class Rule {

	private char variable;
	private ArrayList<char[]> results;
	private boolean isStart;

	public Rule(char variable, ArrayList<String> results, boolean isStart) {

		this.variable = variable;
		this.results = new ArrayList<char[]>();
		for (String result : results) {
			this.results.add(result.toCharArray());
		}
		this.isStart = isStart;
	}
	
	public Rule(char variable, boolean isStart) {

		this.variable = variable;
		this.results = new ArrayList<char[]>();
		this.isStart = isStart;
	}

	public char getVariable() {
		return variable;
	}

	public void setVariable(char variable) {
		this.variable = variable;
	}

	public ArrayList<char[]> getResults() {
		return results;
	}

	public void setResults(ArrayList<char[]> results) {
		this.results = results;
	}
	
	public void addResult (String newResult) {
		this.results.add(newResult.toCharArray());
	}

	public boolean isStart() {
		return isStart;
	}

	public void setStart(boolean isStart) {
		this.isStart = isStart;
	}
}
